<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
</head>

<body>


    <script>
        // var a = 20;
        // var b = 50;
        // var max;
        // a > b ? max = a : max = b;
        // console.log(max);

        var age = 17
        if (age >= 18) {
            alert('已成年,可以去网吧玩了')
        } else {
            alert('乖乖在家写作业！')
        }
    </script>
</body>

</html>